<?php

/* 
 * The include path may change 
 * depending on PHPCodeProvider.php location. 
 */

include_once 'Classes/PHPCodeProvider.php';

/*
 * Create a PHPCodeProvider instance
 * so we can use PHPCodeProvider::createEscapedIdentifier() 
 */

$provider = new PHPCodeProvider();

/*
 * Create escaped identifiers for provided strings if possible.
 */

var_dump($provider->createEscapedIdentifier('validName'));
var_dump($provider->createEscapedIdentifier('15invalid'));
var_dump($provider->createEscapedIdentifier('**invalid'));
var_dump($provider->createEscapedIdentifier('not valid'));
var_dump($provider->createEscapedIdentifier('invalid*/'));

/*
 * The output should be:
 * 
 * string 'validName' (length=9)
 * string '_15invalid' (length=10)
 * boolean false
 * boolean false
 * boolean false
 * 
 */

?>
